package com.sq.partner.manager.service;

import java.util.List;
import java.util.Map;

import org.springframework.ui.ModelMap;

import com.sq.partner.manager.common.Result;
import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.mybatis.model.DictDto;
import com.sq.partner.manager.mybatis.model.GatewayChannelInfo;
import com.sq.partner.manager.mybatis.model.NlifePlan;
import com.sq.partner.manager.mybatis.model.NlifeProd;
import com.sq.partner.manager.util.Page;
/**
 * 新意健险方案审核
 * @author JIJINBO
 *
 */
public interface INlifePlanCheckService {
	
	/**
	 * 分页条件查询方案
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<Map<String,Object>> queryNlifePlanPageByCriteria(Page<Map<String,Object>> page) throws Exception;
	
	/**
	 * 分页条件查询审核未通过的方案
	 * @param page
	 * @return
	 */
	public Page<Map<String, Object>> queryUnApproveNlifePlanPageByCriteria(Page<Map<String, Object>> page) throws Exception;
	
	/**
	 * 分页条件查询合作伙伴
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<GatewayChannelInfo> queryChannelInfoPageByCriteria(Page<GatewayChannelInfo> page) throws Exception;
	
//	/**
//	 * 删除方案
//	 * @param nlifePlan
//	 * @return
//	 * @throws Exception
//	 */
//	public Result delNlifePlan(NlifePlan nlifePlan) throws Exception;
	
	/**
	 * 跳转编辑方案页面前准备数据
	 * @param modelMap
	 * @throws Exception
	 */
	public void toCheckNlifePlan(ModelMap modelMap,String planNo) throws Exception;
	


	/**
	 * 加载  编辑方案页面数据
	 * @param planNo
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> loadNlifePlan(String planNo) throws Exception;

	/**
	 * 分页条件查询新意健险产品
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<NlifeProd> queryNlifeProdPageByCriteria(Page<NlifeProd> page) throws Exception;

	/**
	 * 分页条件查询出单机构
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<CoreDept> queryDeptPageByCriteria(Page<CoreDept> page) throws Exception;
	
	/**
	 * 归属渠道-渠道类型-新业务来源处理(根据codeType和上级code从数据字典中查询下级级联信息)
	 * @param dict
	 * @return
	 * @throws Exception
	 */
	public List<DictDto> loadSubCascadeList(DictDto dict) throws Exception;

	/**
	 * 根据归属机构代码(即出单机构)获取业务员List及团队List
	 * @param COMCODE
	 * @return
	 * @throws Exception
	 */
	public Result querySauserAndTeamInfo(String COMCODE) throws Exception;
	
	/**
	 * 查询中介-协议信息(从销管获取)
	 * @param COMCODE
	 * @param TEAMCODE
	 * @param BUSINESSSOURCE
	 * @param CHANNELNAME
	 * @param PRODCODE
	 * @return
	 * @throws Exception
	 */
	public Result queryAgentAndAgreeInfo(String COMCODE,String TEAMCODE,
				String BUSINESSSOURCE,String CHANNELNAME,String PRODCODE) throws Exception;

	/**
	 * 查询服务代码信息(从销管获取)
	 * @param COMCODE
	 * @param BUSINESSSOURCE
	 * @param CHANNELNAME
	 * @param USERCODE
	 * @param AGENTCODE
	 * @return
	 * @throws Exception
	 */
	public Result queryServiceNo(String COMCODE,String BUSINESSSOURCE,
				String CHANNELNAME,String USERCODE,String AGENTCODE) throws Exception;
	/**
	 * 审核方案
	 * @param nlifePlan
	 * @param nlifeProd
	 * @return
	 * @throws Exception
	 */
	public Result checkNlifePlan(NlifePlan nlifePlan,NlifeProd nlifeProd) throws Exception;

	/**
	 * 加载方案关联个人代理、总对总代理信息
	 * @param page
	 * @param agentType
	 * @return
	 * @throws Exception
	 */
	public Page<Map<String,Object>> queryAgentInfoRelaPageByCriteria(Page<Map<String,Object>> page, String agentType) throws Exception;

	/**
	 * 加载个人代理、总对总代理信息
	 * @param page
	 * @param agentType
	 * @return
	 * @throws Exception
	 */
	public Page<Map<String,Object>> queryAgentInfoPageByCriteria(Page<Map<String,Object>> page, String agentType) throws Exception;

	/**
	 * 更新方案关联的个人代理信息
	 * @param userid
	 * @param planNo
	 * @param agentInfoListStr
	 * @return
	 * @throws Exception
	 */
	public Result updateAgentInfoRela(Long userid, String planNo, String agentInfoListStr) throws Exception;
	
 	
	public List<NlifePlan> queryPartnerInfoByProdCode(String prodCode) throws Exception;




}
